package com.ssy.lingxi.logistics.repository;

import com.ssy.lingxi.logistics.entity.FreightTemplate;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 运费模板实体仓库
 *
 * @author yzc
 * @version 2.0.0
 * @date 2020/7/14
 */
public interface FreightTemplateRepository extends JpaRepository<FreightTemplate, Long>, JpaSpecificationExecutor<FreightTemplate> {

    List<FreightTemplate> findAllByStatusAndMemberIdAndRoleId(Integer status, Long memberId, Long roleId);

    FreightTemplate findByIdAndMemberIdAndRoleId(Long id, Long memberId, Long roleId);

    List<FreightTemplate> findAllByIdInAndStatus(List<Long> id, Integer status);
}